package magics
{
	public class BattleActionData
	{
		public function BattleActionData()
		{
		}
		
		
		public static function getBoneData(data:XML):MagicData{
			var boneData:MagicData = new MagicData();
			boneData.name = data.@name;
			if(data.@x != undefined){
				boneData.x = int(data.@x);
			}
			if(data.@y != undefined){
				boneData.y = int(data.@y);
			}
			if(data.@scaleX != undefined){
				boneData.scaleX = Number(data.@scaleX);
			};
			if(data.@scaleY != undefined){
				boneData.scaleY = Number(data.@scaleY);
			}
			if(data.@rotation != undefined){
				boneData.rotation = Number(Math.round(data.@rotation));
			}
			if(data.@alpha != undefined){
				boneData.alpha = Number(data.@alpha);
			}
			if(data.@cacheType != undefined){
				boneData.cacheType = data.@cacheType;
			}
			if(data.@blendMode != undefined){
				boneData.blendMode = data.@blendMode;
			}
			if(data.@cacheWidth != undefined){
				boneData.cacheWidth = Number(data.@cacheWidth);
			}
			if(data.@cacheHeight != undefined){
				boneData.cacheHeight = Number(data.@cacheHeight);
			}
			return boneData;
		}
	}
}